import org.dom4j.Document;
import org.dom4j.DocumentException;
import org.dom4j.Node;
import org.dom4j.io.SAXReader;

import java.util.List;

public class AnalysisTest {

    public static void main(String[] args) throws DocumentException {
        SAXReader sr = new SAXReader();

        //2.获取文档对象
        Document document =
                sr.read("G:\\javask\\Level2data\\Leve2Model2HW\\Code\\c2\\src\\book.xml");


        List<Node> list = document.selectNodes("//*");
        for (Node node : list) {
            System.out.println(node.getName()+"="+node.getText());
        }



    }
}
